// import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'
// 路由守卫
import '@/router/permission'


import App from './App.vue'
import router from './router'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
// 引入pinia持久化
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
// 注册全局组件
import SvgIcon from '@/components/SvgIcon/index.vue';
import 'virtual:svg-icons-register';


const app = createApp(App)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
app.use(pinia)
app.use(router)
// SvgIcon注册全局组件
app.component('svg-icon', SvgIcon);

app.mount('#app')
